﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnhanceShow : MonoBehaviour
{
	EnhancelScrollView m_enhanceScrollView;
	public Transform m_ScrollView;
	void Start()
	{
		m_enhanceScrollView = m_ScrollView.GetComponent<EnhancelScrollView>();

		for (int i = 0; i < 5; i++)
		{
			var enhanceItemObj = GameObject.Instantiate(Resources.Load<GameObject>("Prefab/ImageCard"));
			var enHanceItem = enhanceItemObj.AddComponent<EnhanceItem>();
			enHanceItem.scrollViewItemIndex = i;
			enHanceItem.transform.SetParent(m_ScrollView);
			enHanceItem.transform.localScale = Vector3.one;
			enHanceItem.transform.localPosition = Vector3.zero;
			m_enhanceScrollView.scrollViewItems.Add(enHanceItem);
			enHanceItem.Init(i + 1);
		}
		m_enhanceScrollView.Init();
	}


}
